from dotenv import load_dotenv
import os
from openai import OpenAI

load_dotenv('.env')

client = OpenAI(
    # This is the default and can be omitted
    api_key=os.environ.get("DEEPSEEK_API_KEY"), base_url="https://api.deepseek.com"
)

response = client.chat.completions.create(
    model="deepseek-coder",
    messages=[
        {"role": "system", "content": "You are a helpful assistant"},
        {"role": "user", "content": "你好啊"},
    ], max_tokens=1024,
    temperature=0.7,
    stream=False
)

print(response.choices[0].message.content)
